import {createRouter, createWebHistory} from 'vue-router'
import Login from '@/views/Login/index.vue'
import Layout from '@/views/Admin/layout/index.vue'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/login',
            name: '登录',
            component: Login
        },
        {
            path: '/home',
            name: 'home',
            component: () => import('@/views/HomeView.vue')
        },
        {
            path: '/img',
            name: '图片轮播',
            component: () => import('@/views/ImgDemo.vue')
        },
        {
            path: '/register',
            name: '注册',
            component: () => import('@/views/register/index.vue')
        },
        {
            path: '/admin',
            name: '管理中心',
            component: Layout,
            children: [
                {
                    path: 'home',
                    name: 'home',
                    meta: {
                        title: '管理中心'
                    },
                    component: () => import('@/views/Admin/home/index.vue')
                },
                {
                    path: 'personal',
                    name: 'personal',
                    meta: {
                        title: '个人中心'
                    },
                    component: () => import('@/views/Admin/layout/personal.vue')
                },
                {
                    path: 'manage/user',
                    name: 'manage/user',
                    meta: {
                        title: '管理用户'
                    },
                    component: () => import('@/views/Admin/manageUser/index.vue')
                },
                {
                    path: 'manage/user/info/:userId',
                    name: 'adminUserInfo',
                    meta: {
                        title: '用户详情'
                    },
                    component: () => import('@/views/Admin/manageUser/userInfo.vue')
                },
                {
                    path: 'manage/student',
                    name: 'manage/student',
                    meta: {
                        title: '管理学生'
                    },
                    component: () => import('@/views/Admin/manageStudent/index.vue')
                },
                {
                    path: 'manage/student/info/:studentId',
                    name: 'adminStudentInfo',
                    meta: {
                        title: '学生详情'
                    },
                    component: () => import('@/views/Admin/manageStudent/studentInfo.vue')
                },
                {
                    path: 'manage/enterprise',
                    name: 'manage/enterprise',
                    meta: {
                        title: '管理企业'
                    },
                    component: () => import('@/views/Admin/manageEnterprise/index.vue')
                },
                {
                    path: 'manage/enterprise/info/:enterpriseId',
                    name: 'adminEnterpriseInfo',
                    meta: {
                        title: '企业详情'
                    },
                    component: () => import('@/views/Admin/manageEnterprise/enterpriseInfo.vue')
                },
                {
                    path: 'manage/job',
                    name: 'manage/job',
                    meta: {
                        title: '管理岗位'
                    },
                    component: () => import('@/views/Admin/manageJob/index.vue')
                },
                {
                    path: 'manage/job/info/:jobId',
                    name: 'adminJobInfo',
                    meta: {
                        title: '岗位详情'
                    },
                    component: () => import('@/views/Admin/manageJob/jobInfo.vue')
                },
                {
                    path: 'manage/video',
                    name: 'manage/video',
                    meta: {
                        title: '管理宣讲会'
                    },
                    component: () => import('@/views/Admin/manageVideo/index.vue')
                },
                {
                    path: 'manage/video/info/:videoId',
                    name: 'adminVideoInfo',
                    meta: {
                        title: '宣讲会详情'
                    },
                    component: () => import('@/views/Admin/manageVideo/videoInfo.vue')
                },
                {
                    path: 'audit/student',
                    name: 'audit/student',
                    meta: {
                        title: '审核学生'
                    },
                    component: () => import('@/views/Admin/auditStudent/index.vue')
                },
                {
                    path: 'student/info/:studentId',
                    name: '学生详情',
                    meta: {
                        title: '学生详情'
                    },
                    component: () => import('@/views/Admin/auditStudent/studentInfo.vue')
                },
                {
                    path: 'audit/enterprise',
                    name: 'audit/enterprise',
                    meta: {
                        title: '审核企业'
                    },
                    component: () => import('@/views/Admin/auditEnterprise/index.vue')
                },
                {
                    path: 'enterprise/info/:enterpriseId',
                    name: '企业详情',
                    meta: {
                        title: '企业详情'
                    },
                    component: () => import('@/views/Admin/auditEnterprise/enterpriseInfo.vue')
                },
                {
                    path: 'audit/video',
                    name: 'audit/video',
                    meta: {
                        title: '审核宣讲会'
                    },
                    component: () => import('@/views/Admin/auditVideo/index.vue')
                },
                {
                    path: 'video/info/:videoId',
                    name: '宣讲会详情',
                    meta: {
                        title: '宣讲会详情'
                    },
                    component: () => import('@/views/Admin/auditVideo/videoInfo.vue')
                },
                {
                    path: 'manage/report',
                    name: 'manage/report',
                    meta: {
                        title: '举报反馈'
                    },
                    component: () => import('@/views/Admin/manageReport/index.vue')
                },
                {
                    path: 'manage/report/info/:reportId',
                    name: 'adminReportInfo',
                    meta: {
                        title: '反馈详情'
                    },
                    component: () => import('@/views/Admin/manageReport/reportInfo.vue')
                },
            ]
        },
        {
            path: '/student',
            name: '学生求职',
            component: () => import('@/views/Student/layout/index.vue'),
            children: [
                {
                    path: 'studentHome',
                    name: 'studentHome',
                    meta: {
                        title: '首页'
                    },
                    component: () => import('@/views/Student/home/index.vue')
                },
                {
                    path: 'studentPersonal',
                    name: 'studentPersonal',
                    meta: {
                        title: '个人中心'
                    },
                    component: () => import('@/views/Student/layout/personal.vue')
                },
                {
                    path: 'resume',
                    name: 'resume',
                    meta: {
                        title: '个人简历'
                    },
                    component: () => import('@/views/Student/resume/index.vue')
                },
                {
                    path: 'suggestjob',
                    name: 'suggestjob',
                    meta: {
                        title: '推荐岗位'
                    },
                    component: () => import('@/views/Student/job/suggestjob.vue'),
                },
                {
                    path: 'job',
                    name: 'job',
                    meta: {
                        title: '浏览岗位'
                    },
                    component: () => import('@/views/Student/job/index.vue'),
                },
                {
                    path: 'job/detail/:jobId',
                    name: '岗位详情',
                    meta: {
                        title: '岗位详情'
                    },
                    component: () => import('@/views/Student/job/jobDetail.vue')
                },
                {
                    path: 'collect',
                    name: 'collect',
                    meta: {
                        title: '收藏岗位'
                    },
                    component: () => import('@/views/Student/collect/index.vue'),
                },
                {
                    path: 'collect/detail/:jobId',
                    name: '收藏岗位详情',
                    meta: {
                        title: '收藏岗位详情'
                    },
                    component: () => import('@/views/Student/collect/collectDetail.vue')
                },
                {
                    path: 'video',
                    name: 'video',
                    meta: {
                        title: '空中宣讲会'
                        ,
                    },
                    component: () => import('@/views/Student/video/index.vue'),
                },
                {
                    path: 'video/studentVideoInformation/:videoId',
                    name: '宣讲会详情',
                    meta: {
                        title: '宣讲会详情'
                    },
                    component: () => import('@/views/Student/video/studentVideoInformation.vue')
                },
                {
                    path: 'jobIntention',
                    name: 'jobIntention',
                    meta: {
                        title: '发布求职意向'
                        ,
                    },
                    component: () => import('@/views/Student/jobIntention/index.vue'),
                },
                {
                    path: 'offer',
                    name: 'offer',
                    meta: {
                        title: 'OFFER-信息通知'
                    },
                    component: () => import('@/views/Student/offer/index.vue'),
                },
                {
                    path: 'offer/detail/:offerId/:jobId/:studentId',
                    name: 'offerDetail',
                    meta: {
                        title: 'Offer-详情'
                    },
                    component: () => import('@/views/Student/offer/offerDetail.vue')
                },
                {
                    path: 'news',
                    name: 'news',
                    meta: {
                        title: '面试-消息通知'
                    },
                    component: () => import('@/views/Student/news/index.vue'),
                },
                {
                    path: 'report',
                    name: 'report',
                    meta: {
                        title: '反馈举报'
                    },
                    component: () => import('@/views/Student/report/index.vue'),
                },
            ]
        },
        {
            path: '/enterprise',
            name: '企业招聘',
            component: () => import('@/views/Enterprise/layout/index.vue'),
            children: [
                {
                    path: 'enterpriseHome',
                    name: 'enterpriseHome',
                    meta: {
                        title: '首页'
                    },
                    component: () => import('@/views/Enterprise/home/index.vue')
                },
                {
                    path: 'enterprisePersonal',
                    name: 'enterprisePersonal',
                    meta: {
                        title: '个人中心'
                    },
                    component: () => import('@/views/Enterprise/layout/personal.vue')
                },
                {
                    path: 'information',
                    name: 'information',
                    meta: {
                        title: '企业信息'
                    },
                    component: () => import('@/views/Enterprise/information/index.vue')
                },
                {
                    path: 'publishJob',
                    name: 'publishJob',
                    meta: {
                        title: '发布岗位'
                    },
                    component: () => import('@/views/Enterprise/job/index.vue')
                },
                {
                    path: 'enterpriseManageJob',
                    name: 'enterpriseManageJob',
                    meta: {
                        title: '管理岗位'
                    },
                    component: () => import('@/views/Enterprise/job/manageJob.vue')
                },
                {
                    path: 'enterpriseManageJob/job/info/:jobId/:name',
                    name: '岗位详情',
                    meta: {
                        title: '岗位详情'
                    },
                    component: () => import('@/views/Enterprise/job/jobInfo.vue')
                },
                {
                    path: 'publishVideo',
                    name: 'publishVideo',
                    meta: {
                        title: '发布空中宣讲会'
                    },
                    component: () => import('@/views/Enterprise/video/index.vue'),
                },
                {
                    path: 'querySend',
                    name: 'querySend',
                    meta: {
                        title: '查看投递'
                    },
                    component: () => import('@/views/Enterprise/querySend/index.vue'),
                },
                {
                    path: 'querySend/detail/:jobId/:enterpriseId/:studentId',
                    name: 'querySend/detail',
                    meta: {
                        title: '投递详情'
                    },
                    component: () => import('@/views/Enterprise/querySend/sendDetail.vue'),
                },
                {
                    path: 'querySend/sendJobDetail/:jobId',
                    name: 'querySend/sendDetail',
                    meta: {
                        title: '投递详情'
                    },
                    component: () => import('@/views/Enterprise/querySend/sendJobDetail.vue'),
                },
                {
                    path: 'queryIntention',
                    name: 'queryIntention',
                    meta: {
                        title: '求职广场'
                    },
                    component: () => import('@/views/Enterprise/queryIntention/index.vue'),
                },
                {
                    path: 'queryIntention/detail/:intentionStudentId',
                    name: 'queryIntention/detail',
                    meta: {
                        title: '求职详情-简历'
                    },
                    component: () => import('@/views/Enterprise/queryIntention/intentionDetail.vue'),
                },
                {
                    path: 'interview',
                    name: 'interview',
                    meta: {
                        title: '面试记录'
                    },
                    component: () => import('@/views/Enterprise/interview/index.vue'),
                },
                {
                    path: 'interview/info/:interviewId',
                    name: 'interview/info',
                    meta: {
                        title: '面试详情'
                    },
                    component: () => import('@/views/Enterprise/interview/interviewInfo.vue'),
                },
                {
                    path: 'enterpriseNews',
                    name: 'enterpriseNews',
                    meta: {
                        title: '消息通知'
                    },
                    component: () => import('@/views/Enterprise/news/index.vue'),
                },
                {
                    path: 'enterpriseNews/detail/:offerId/:jobId/:enterpriseId',
                    name: 'enterpriseNewsDetail',
                    meta: {
                        title: '消息-详情'
                    },
                    component: () => import('@/views/Enterprise/news/newDetail.vue'),
                },
            ]
        }
    ]
})

export default router
